package cn.kn.sys.service.impl;

import cn.kn.sys.vo.ActiveUser;
import org.apache.shiro.SecurityUtils;

/**
 * @author WangJiang
 * @create 2020-12-15 9:22
 */
public abstract class BaseService {
    public Long getUserId(){

        return getUser().getUser().getId();
    }

    protected ActiveUser getUser(){
        return (ActiveUser) SecurityUtils.getSubject().getPrincipal();
    }
}
